import Mock from 'mockjs'
import userApi from './user.js'
import homeApi from './home.js'

//rurl,rtype,function(options)) (地址,请求方式,数据)
Mock.mock('/api/home/getData','get',homeApi.getHomeData)

// 配置拦截用户相关的URL
// 拦截的是/api/user/getUserData
Mock.mock(/\/user\/getUserData/,'get',userApi.getUserList)

// 修改用户
Mock.mock(/\/user\/updUserInfo/,'post',userApi.updateUser)
// 增加用户   createUser
Mock.mock(/\/user\/addUserInfo/,'post',userApi.createUser)
// 删除用户 deleteUser
Mock.mock(/\/user\/delUserInfo/,'get',userApi.deleteUser)